m21fandomcom-20200214-history
Mail Lists
Mail lists There are several ways to manage a mailing list. The most commonly available methods under Unix are direct use of aliases in the MTA (most often sendmail) and the Majordomo list server. Which method to use depends on the size and complexity of the mailing list. Using aliases in the MTA is typically only useful for a mailing list with a small number of recipients that do not change often, as every change in the list structure involves human intervention. Majordomo automates many mailing list functions, which makes large mailing lists easier to manage. Simple lists in sendmail * The alias for the list itself; for example, listname * listname-request: This is the address to which subscription, unsubscribe, and list information requests should be sent. It points to the person or persons that manage the list * owner-listname: This is the address used by sendmail to return errors about the list. This usually points to the same addresses as listname-request For example, suppose we want to set up a mailing list on M21.net for customer of NEKO, called "neko-cust". The manager of this list would be perl@m21.net, and the mailing list members would be baz@m21.net, zippy@pinhead.com, and buttmonkey@nyu.edu. The following would be added to the sendmail aliases file (usually /etc/aliases) on groucho.m21.net: neko-cust: baz@foo.bar.com, zippy@pinhead.com, buttmonkey@nyu.edu neko-cust-request: joe owner-neko-cust: neko-cust-request In this case, owner-NEKO-cust has been aliased to point to the same address as NEKO-cust-request. If a mailing list is larger than just a few recipients, it is sometimes too cumbersome to keep all of the information in the aliases file. In this case, the list of addresses is kept in a file, and is referred to by the sendmail :include: directive. (Note that not all versions of sendmail support file inclusion; see the documentation for your version of sendmail for details). So, following the previous example, the list of recipients will be moved to the file /home/lists/neko-cust-members. Example The file will typically look like this:= notso-mad@m21.net zippy@pinhead.com buttmonkey@nyu.edu The aliases file is changed to look like this:= NEKO-cust: :include:/home/lists/neko-cust-members NEKO-cust-request: joe owner-NEKO-cust: NEKO-cust-request Running newaliases:= Include files might also be used for neko-cust-request and owner-neko-cust if a number of people manage the list. Always remember to run newaliases after modifying any mailing list addresses. Bounced mail Mail Bounces: Under the simple setup outlined above, mail that bounces from any of the addresses on the mailing list will go back to the sender, rather than the list administrator (except under sendmail version 8; see below). This is obviously not a good idea, since the list administrator is the only one who can remedy the situation. One solution to this problem is to run a new sendmail process for every message sent to the list. This requires creating a new alias to refer to the recipients of the list; using our above example, the new alias will be called widget-dev-recipients. The new alias file will look like this: Adding larger list to sendmail= neko-cust: "|/usr/lib/sendmail -fowner-widget-dev -oi neko-cust-recipients" neko-cust-recipients: :include:/home/lists/neko-cust-members neko-cust-request: joe owner-neko-cust: neko-cust-request The envelope This tells sendmail to create a new envelope for mail sent to neko-cust. All mail that is distributed to the widget-dev list will have a Return-Path: address of owner-neko-cust@m21.net, so that errors will go to the list owner rather than to the original sender. One problem with this setup is that the sendmail -f option only works for trusted users such as root or daemon. This is fine for mail sent from off-site, but will not work for local users. Local users may have to use the neko-cust-recipients address instead. Another solution is to keep the mailing list on a machine where none of the members have accounts. This is a workable solution if you already use a dedicated mail server. Version 8 Sendmail Note Note: Under sendmail version 8, if a mail alias contains a corresponding alias with an "owner-" prefix, bounces and errors for that list will automatically be sent to the owner- address.